<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <loading-page v-if="loading"/>
      <route-view v-else/>
    </div>
  </a-config-provider>
</template>
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import LoadingPage from '@/views/Index'
export default {
  components: { LoadingPage },
  data () {
    return {
      locale: zhCN,
      loading: true,
      timer: null
    }
  },
  created () {
    const that = this
    this.$message.config({ container: 'main' })
    this.timer = setTimeout(that.loadingEnd, 3000)
  },
  methods: {
    loadingEnd () {
      this.loading = false
      clearTimeout(this.timer)
    }
  }
}
</script>
<style lang="less">
/* 滚动条优化 start */
::-webkit-scrollbar{
  width:10px;
  height:8px;
}
::-webkit-scrollbar-track{
  background: #f6f6f6;
  border-radius:2px;
}
::-webkit-scrollbar-thumb{
  background: #cdcdcd;
  border-radius:2px;
}
::-webkit-scrollbar-thumb:hover{
  background: #747474;
}
::-webkit-scrollbar-corner {
  background: #f6f6f6;
}
/* 滚动条优化 end */
</style>
